/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import Mock from 'mockjs';
const { mock, Random } = Mock;

export default {
  'POST /LargeAmountApply/applyList': (req: Request, res: Response) => {
    res.send(
      mock({
        code: 0,
        msg: 'success',
        data: {
          'list|5-20': [
            {
              'id|+1': 1,
              name: '@cname',
              id_card_number: /\d{18}/,
              'type|1': ['courier', 'dak'],
              mobile: /\d{11}/,
              'money|10000-30000': 10000,
              account: /\d{11}/,
              id_pic: Random.image('300x300', '#4A7BF7', 'Hello'),
              paper_pic: Random.image('300x300', '#50B347', '#FFF', 'Mock.js'),
              'status|1': ['1', '2', '3'],
              apply_name: '@cname',
              created_time: '@datetime',
            },
          ],
        },
      }),
    );
  },
  'POST /LargeAmountApply/review': (req: Request, res: Response) => {
    res.send({
      code: 0,
      msg: 'message',
    });
  },
  'POST /LargeAmountApply/applyRecord': (req: Request, res: Response) => {
    res.send(
      mock({
        code: 0,
        msg: 'success',
        data: {
          'list|5-20': [
            {
              'id|+1': 1,
              name: '@cname',
              id_card_number: /\d{18}/,
              'type|1': ['courier', 'dak'],
              mobile: /\d{11}/,
              'money|10000-30000': 10000,
              account: /\d{11}/,
              id_pic: Random.image('300x300', '#4A7BF7', 'Hello'),
              paper_pic: Random.image('300x300', '#50B347', '#FFF', 'Mock.js'),
              'status|1': ['1', '2', '0'],
              'deduction_status|1': ['1', '2', '0'],
              apply_name: '@cname',
              created_time: '@datetime',
            },
          ],
        },
      }),
    );
  },
  'POST /LargeAmountApply/applyCash': (req: Request, res: Response) => {
    res.send({
      code: 0,
      msg: 'message',
    });
  },
};
